package com.designpatterns.commandpattern;

public class Stock
{
	// 定义物品的名称和数量
	private String name = "ABC";
	private int quantity = 10;

	// 买它
	public void buy()
	{
		System.out.println("Stock [ Name: " + name + ",Quantity: " + quantity + " ] bought");
	}

	// 卖他
	public void sell()
	{
		System.out.println("Stock [ Name: " + name + ",Quantity: " + quantity + " ] sold");
	}
}
